import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import {KnowledgeCardComponent} from "./knowledge.card.component";
import {SubjectsCardComponent} from "./subjects.card.component";
import {HttpClientModule} from "@angular/common/http";
import {RouterModule} from "@angular/router";
import {FormulaEditorComponent} from "./formulla.editor.component";
import {FormsModule} from "@angular/forms";
import {KnowledgesComponent} from "./knowledges.component";
import {KnowledgeService} from "./svr/knowledge.service";

@NgModule({
  declarations: [
    AppComponent,KnowledgeCardComponent,SubjectsCardComponent,FormulaEditorComponent,KnowledgesComponent
  ],
  imports: [
    BrowserModule,HttpClientModule,FormsModule,RouterModule.forRoot([
      {path:"",component:KnowledgesComponent},
      {path:"subjects",component:SubjectsCardComponent},
      {path:"editor/:knowledge",component:FormulaEditorComponent}
    ])
  ],
  providers: [KnowledgeService],
  bootstrap: [AppComponent]
})
export class AppModule { }
